package com.evil.common.application.dto.process.node;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 流程节点实体
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@NoArgsConstructor
public class NodeBaseDTO {

    /**
     * 节点id
     */
    @NotNull(message = "节点id不能为空")
    private Long nodeId;

    /**
     * 节点类型(0: 开始节点, 1: 结束节点, 2: 网关节点, 3:审批节点, 4:填写节点, 5:抄送节点, )
     */
    @NotNull(message = "节点类型不能为空")
    private Integer nodeType;

    /**
     * 审批类型(node_type = 1 时有效；0: 或签, 1:会签)
     */
    private Integer approvalType;

    /**
     * 节点名称
     */
    private String nodeName;

    public NodeBaseDTO(@NotNull(message = "节点id不能为空") Long nodeId, @NotNull(message = "节点类型不能为空") Integer nodeType, String nodeName) {
        this.nodeId = nodeId;
        this.nodeType = nodeType;
        this.nodeName = nodeName;
    }

    public NodeBaseDTO(@NotNull(message = "节点id不能为空") Long nodeId, @NotNull(message = "节点类型不能为空") Integer nodeType) {
        this.nodeId = nodeId;
        this.nodeType = nodeType;
    }

    public NodeBaseDTO(@NotNull(message = "节点类型不能为空") Integer nodeType) {
        this.nodeType = nodeType;
    }
}
